");return n.inlineElement=r,r}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var B,L="ajax",H=function(){B&&e(document.body).removeClass(B)},A=function(){H(),t.req&&t.req.abort()};e.magnificPopup.registerModule(L,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'
The content could not be loaded.'},proto:{initAjax:function(){t.types.push(L),B=t.st.ajax.cursor,I(s+"."+L,A),I("BeforeChange."+L,A)},getAjax:function(n){B&&e(document.body).addClass(B),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,r){var a={data:i,xhr:r};k("ParseAjax",a),t.appendContent(e(a.data),L),n.finished=!0,H(),t._setFocus(),setTimeout(function(){t.wrap.addClass(v)},16),t.updateStatus("ready"),k("AjaxContentAdded")},error:function(){H(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var F,j=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'
',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'
The image could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),I(p+i,function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)}),I(s+i,function(){n.cursor&&e(document.body).removeClass(n.cursor),b.off("resize"+g)}),I("Resize"+i,t.resizeImage),t.isLowIE&&I("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,F&&clearInterval(F),e.isCheckingImgSize=!1,k("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(r){F&&clearInterval(F),F=setInterval(function(){return i.naturalWidth>0?void t._onImageHasSize(e):(n>200&&clearInterval(F),n++,void(3===n?o(10):40===n?o(50):100===n&&o(500)))},r)};o(1)},getImage:function(n,i){var o=0,r=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,k("ImageLoadComplete")):(o++,200>o?setTimeout(r,100):a()))},a=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",r).on("error.mfploader",a),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),c=n.img[0],c.naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:j(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(F&&clearInterval(F),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var N,W=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,r,a=n.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},r="transition";return o["-webkit-"+r]=o["-moz-"+r]=o["-o-"+r]=o[r]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};I("BuildControls"+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),e=t._getItemToZoom(),!e)return void d();r=c(e),r.css(t._getOffset()),t.wrap.append(r),o=setTimeout(function(){r.css(t._getOffset(!0)),o=setTimeout(function(){d(),setTimeout(function(){r.remove(),e=r=null,k("ZoomAnimationEnded")},16)},a)},16)}}),I(l+i,function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=a,!e){if(e=t._getItemToZoom(),!e)return;r=c(e)}r.css(t._getOffset(!0)),t.wrap.append(r),t.content.css("visibility","hidden"),setTimeout(function(){r.css(t._getOffset())},16)}}),I(s+i,function(){t._allowZoom()&&(d(),r&&r.remove(),e=null)})}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(n){var i;i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem);var o=i.offset(),r=parseInt(i.css("padding-top"),10),a=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-r;var s={width:i.width(),height:(w?i.innerHeight():i[0].offsetHeight)-a-r};return W()?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var Z="iframe",q="//about:blank",R=function(e){if(t.currTemplate[Z]){var n=t.currTemplate[Z].find("iframe");n.length&&(e||(n[0].src=q),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(Z,{options:{markup:'
',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(Z),I("BeforeChange",function(e,t,n){t!==n&&(t===Z?R():n===Z&&R(!0))}),I(s+"."+Z,function(){R()})},getIframe:function(n,i){var o=n.src,r=t.st.iframe;e.each(r.patterns,function(){return o.indexOf(this.index)>-1?(this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1):void 0});var a={};return r.srcAction&&(a[r.srcAction]=o),t._parseMarkup(i,a,n),t.updateStatus("ready"),i}}});var K=function(e){var n=t.items.length;return e>n-1?e-n:0>e?n+e:e},D=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'
',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";return t.direction=!0,!(!n||!n.enabled)&&(r+=" mfp-gallery",I(p+o,function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",function(){return t.items.length>1?(t.next(),!1):void 0}),i.on("keydown"+o,function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()})}),I("UpdateStatus"+o,function(e,n){n.text&&(n.text=D(n.text,t.currItem.index,t.items.length))}),I(u+o,function(e,i,o,r){var a=t.items.length;o.counter=a>1?D(n.tCounter,r.index,a):""}),I("BuildControls"+o,function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(y),r=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(y);o.click(function(){t.prev()}),r.click(function(){t.next()}),t.container.append(o.add(r))}}),I(f+o,function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout(function(){t.preloadNearbyImages(),t._preloadTimeout=null},16)}),void I(s+o,function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=K(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=K(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=K(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),k("LazyLoad",i),"image"===i.type&&(i.img=e('
![]()
').on("load.mfploader",function(){i.hasSize=!0}).on("error.mfploader",function(){i.hasSize=!0,i.loadError=!0,k("LazyLoadError",i)}).attr("src",i.src)),i.preloaded=!0}}}});var U="retina";e.magnificPopup.registerModule(U,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,function(e){return"@2x"+e})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;n=isNaN(n)?n():n,n>1&&(I("ImageHasSize."+U,function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})}),I("ElementParse."+U,function(t,i){i.src=e.replaceSrc(i,n)}))}}}}),_()});
(function(){"use strict";function e(){}function t(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function n(e){return function(){return this[e].apply(this,arguments)}}var i=e.prototype,r=this,s=r.EventEmitter;i.getListeners=function(e){var t,n,i=this._getEvents();if("object"==typeof e){t={};for(n in i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n])}else t=i[e]||(i[e]=[]);return t},i.flattenListeners=function(e){var t,n=[];for(t=0;t
=0;
var isChrome = !!window.chrome&&!!window.chrome.webstore;
var isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0||!isChrome&&!isOpera&&window.webkitAudioContext!==undefined;
var standalone=window.navigator.standalone,
userAgent=window.navigator.userAgent.toLowerCase(),
safari=/safari/.test(userAgent),
ios=/iphone|ipod|ipad/.test(userAgent);
if(ios||isSafari){
$('.team-person').matchHeight();
$('.tile').matchHeight();
}
var swipers={};
var attrsToSize={
'data-md-slides':'1023',
'data-sm-slides':'768',
'data-xs-slides':'599'
};
function parseSlidesAttrValue(value){
var parts=value.split(',');
return {
slidesPerView: parseInt(parts[0],10),
spaceBetween: parseInt(parts[1],10)
}}
function createBreakpoints(container, attrsToSize){
var breakpointsObj={};
$.each(attrsToSize, function(key ,value){
if(container.attr(key)){
breakpointsObj[value]=parseSlidesAttrValue(container.attr(key));
}});
return breakpointsObj;
}
$('.swiper-container').each(function(index){
var $t=$(this);
var sliderIndex='swiper-unique-id-'+ index;
$t.addClass(sliderIndex + ' initialized').attr('id', sliderIndex);
$t.find('.swiper-pagination').addClass('pagination-'+ sliderIndex);
var autoPlayVar=$t.attr('data-autoplay');
var mode=$t.attr('data-mode');
var loopVar=$t.attr('data-loop');
var speedVar=parseInt($t.attr('data-speed'),10);
var centerVar=$t.attr('data-center');
var spaceBetweenVar=parseInt($t.attr('data-space-between'),10);
var slideEffect=$t.attr('data-slide-effect');
var slidesPerViewVar=parseInt($t.attr('data-slides-per-view'),10);
if(isNaN(slidesPerViewVar)){
slidesPerViewVar='auto';
}
swipers[sliderIndex]=new Swiper('.' + sliderIndex,{
loop: loopVar||false,
autoplay: autoPlayVar||false,
autoplayDisableOnInteraction: false,
speed: speedVar||300,
slidesPerView: slidesPerViewVar||1,
spaceBetween: spaceBetweenVar,
pagination: '.pagination-' + sliderIndex,
paginationClickable: true,
centeredSlides: centerVar||false,
mode: mode||'horizontal',
grabCursor: true,
keyboardControl: true,
breakpoints: createBreakpoints($t, attrsToSize),
setWrapperSize: true,
effect: slideEffect||'slide',
fade: {
crossFade: true
}});
});
$(".btn-search").on('click', function(event){
var $searchForm=$(this).parent().parent().find(".menu-search-col");
var ANIMATION_DURATION=400;
if($searchForm.hasClass('menu-search-col--active')){
$searchForm.fadeToggle(ANIMATION_DURATION);
setTimeout(function (){
$searchForm.removeClass('menu-search-col--active');
}, ANIMATION_DURATION);
}else{
$searchForm.fadeToggle(ANIMATION_DURATION).addClass('menu-search-col--active');
}
event.stopPropagation();
});
$("body").on('click', function(){
var $searchForm=$(".btn-search").parent().parent().find(".menu-search-col");
if($searchForm.hasClass('menu-search-col--active')){
$searchForm.fadeToggle(400);
setTimeout(function (){
$searchForm.removeClass('menu-search-col--active');
}, 400);
}});
$(".menu-search-col .search-form").on('click', function(event){
event.stopPropagation();
});
var accordRemoveClass=function(el, _class){
if(el.classList){
el.classList.remove(_class ? _class:'active');
}else{
el.className=panel.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
}};
$('.accordion').on('click', '.accordion-title', function(){
var panel_parent=this.parentNode,
panel_container=panel_parent.parentNode,
panels_wrap=panel_container.querySelectorAll('.accordion-item');
if($(this).closest('.accordion').hasClass('toggle')){
Array.prototype.forEach.call(panels_wrap, function(panel, i){
if(panel!==panel_parent){
accordRemoveClass(panel);
}});
}
if(-1!==this.parentNode.className.indexOf('active')){
accordRemoveClass(panel_parent);
}else{
panel_parent.className +=' active';
}});
$('.tabs-header').on('click', 'li', function(e){
e.preventDefault();
if(!$(this).hasClass('active')){
var index_el=$(this).index();
$(this).addClass('active').siblings().removeClass('active');
$(this).closest('.tabs').find('.tabs-item').removeClass('active').eq(index_el).addClass('active');
}});
var $stickyElement, stickyTopOffset, stickyHeight, $stickyContainer;
if($('.js-sticky').length){
setTimeout(function (){
$stickyElement=$('.js-sticky');
stickyTopOffset=$stickyElement.offset().top;
$stickyElement.before('');
stickyHeight=$stickyElement.height();
$stickyContainer=$('.sticky-container').height(stickyHeight + 1);
}, 200);
}
$('.nav-menu-icon').click(function(e){
$(this).toggleClass('active');
$('.main-navigation').toggleClass('active');
if($('.js-sticky').length){
$stickyElement.toggleClass('sticky-menu').toggleClass('sticky-menu--active');
$('body').toggleClass('no-scroll');
}});
$window.on('resize', function(){
if($('.js-sticky').length){
$stickyElement=$('.js-sticky');
stickyHeight=$stickyElement.height();
$stickyContainer=$('.sticky-container').height(stickyHeight + 1);
setWindowWidth();
}});
$window.on('scroll', function(){
if($('.js-sticky').length){
$stickyElement=$('.js-sticky');
if($(this).scrollTop() >=stickyTopOffset){
$stickyElement.addClass('sticky-menu').addClass('scrolling');
}else{
$stickyElement.removeClass('sticky-menu').removeClass('scrolling');
}}
});
$('.menu-item-has-children > a').append('');
$('.toggle-menu-item').on('click', function(e){
e.preventDefault();
var $menuItem=$(this).closest('.menu-item-has-children');
if($menuItem.hasClass('menu-item--active')){
$menuItem.removeClass('menu-item--active').children('.sub-menu, .mega-sub-menu').slideUp();
}else{
$menuItem.addClass('menu-item--active').children('.sub-menu, .mega-sub-menu').slideDown();
}});
$(".main-menu").on('mouseover', '.menu-item:not(.mega-menu-item)', function(){
if($windowWidth >=1024){
clearTimeout($.data(this, 'timer'));
$(this).children('.sub-menu, .mega-sub-menu').stop(true, true).slideDown(200);
}});
$(".main-menu").on('mouseout', '.menu-item:not(.mega-menu-item)', function(){
if($windowWidth >=1024){
$.data(this, 'timer', setTimeout($.proxy(function(){
$(this).children('.sub-menu, .mega-sub-menu').stop(true, true).slideUp(200);
},this), 200));
}});
var $grid=$('.isotope-container').isotope({
itemSelector: '.gallery-item',
percentPosition: true,
masonry: {
columnWidth: '.grid-sizer',
gutter: '.gutter-sizer'
}});
$grid.imagesLoaded().progress(function(){
$grid.isotope('layout');
});
$('.filter-wrap').on('click', 'button', function(){
$(this).siblings().removeClass('active');
$(this).addClass('active');
var $thisIsotope=$(this).parent().siblings('.isotope-container');
var filterValue=$(this).attr('data-filter');
$thisIsotope.isotope({ filter: filterValue });
});
$('.video-banner').each(function(){
var videoWrap=$(this),
videoPopUp=videoWrap.find('.video-popup'),
buttonPlay=videoWrap.find('.play-btn'),
videoIframe=videoPopUp.find('iframe'),
iframeSrc=videoIframe.attr('src'),
iframeDataSrc=videoIframe.attr('data-src'),
closePlayButton=videoPopUp.find('.close-btn');
videoWrap.closest('.wpb_wrapper').css('height', '100%');
buttonPlay.on('click', function(e){
e.preventDefault();
videoPopUp.addClass('active');
videoIframe.attr('src', iframeDataSrc);
})
closePlayButton.on('click', function(){
videoPopUp.removeClass('active');
videoIframe.attr('src', iframeSrc);
});
});
(function (){
function initMap(element, addresses){
var infowindow, currAddress, coords=[], markers=[];
var grayscaleStyle=[
{
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"elementType": "labels.text.stroke",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
"featureType": "administrative.land_parcel",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#bdbdbd"
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "poi",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "poi.business",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "poi.park",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "poi.park",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "road",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
}
]
},
{
"featureType": "road",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#dadada"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "transit",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "transit.line",
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#ffffff"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
}
];
var mapZoom=locations[0].zoom||12;
var latlng=new google.maps.LatLng(locations[0].lat, locations[0].lng);
var geocoder=new google.maps.Geocoder();
var bounds=new google.maps.LatLngBounds();
var mapOptions={
zoom: mapZoom,
center: latlng,
zoomControl: true,
draggable: locations[0].draggable,
scrollwheel: false,
styles: locations[0].style ? grayscaleStyle:false
};
var map=new google.maps.Map(element, mapOptions);
for(var i=0; i < addresses.length; i++){
var geo={},
addr=addresses[i].address;
if(addresses[i].location=='coordinates'){
geo={'latLng': latlng}}else{
geo={'address': addresses[i].address}}
console.log(geo);
geocoder.geocode(geo, function (results, status){
if(status==google.maps.GeocoderStatus.OK){
var content=locations[0].content||addr;
if(locations[0].location=='coordinates'){
coords=latlng;
}else{
coords=results[0].geometry.location;
}
console.log(content);
var marker=new google.maps.Marker({
position: coords,
icon: locations[0].defaultMarker ? '':locations[0].bullet,
map: map,
title: false
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', function(){
if(!infowindow){
infowindow=new google.maps.InfoWindow();
}
infowindow.setContent(content);
infowindow.open(map, marker);
});
bounds.extend(coords);
map.fitBounds(bounds);
if(locations.length==1){
map.setZoom(mapZoom);
}}else{
throw('No results found: ' + status);
}});
}}
var mapDetect=$('.single-location__map');
if(mapDetect.length){
var locations=[{
location: mapDetect.attr('data-location'),
address: mapDetect.attr('data-address'),
lat: Number(mapDetect.attr('data-lat')),
lng: Number(mapDetect.attr('data-lng')),
bullet: mapDetect.attr('data-bullet'),
content: mapDetect.attr('data-content'),
draggable: mapDetect.attr('data-draggable'),
defaultMarker: false,
style: true,
zoom: Number(mapDetect.attr('data-zoom'))
}];
$('.single-location__map').each(function(){
initMap(this, locations);
});
}}());
$(".gallery-container").last().addClass("last-child");
$('.isotope-container').each(function(){
$(this).magnificPopup({
delegate: '.gallery-item a',
type: 'image',
gallery: {
enabled: true
},
mainClass: 'mfp-fade',
fixedContentPos: false
});
});
$('.post__likes').on('click', function(){
var $this=$(this),
post_id=$this.attr('data-id');
$.ajax({
type: "POST",
url: js_data.ajaxurl,
data: ({
action: 'lawyer_like_post',
post_id: post_id
}),
success: function(msg){
$this.find('.count').text(msg);
}});
return false;
});
if($('body').hasClass('single')){
$(".post__content.single-content").fitVids();
}})(jQuery, window, document);
window.addComment=function(u){var v,y,p,f=u.document,I={commentReplyClass:"comment-reply-link",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=u.MutationObserver||u.WebKitMutationObserver||u.MozMutationObserver,i="querySelector"in f&&"addEventListener"in u,n=!!f.documentElement.dataset;function t(){r(),e&&new e(d).observe(f.body,{childList:!0,subtree:!0})}function r(e){if(i&&(v=h(I.cancelReplyId),y=h(I.commentFormId),v)){v.addEventListener("touchstart",a),v.addEventListener("click",a);var t=function(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return y.removeEventListener("keydown",t),e.preventDefault(),y.submit.click(),!1};y&&y.addEventListener("keydown",t);for(var n,r=function(e){var t=I.commentReplyClass;e&&e.childNodes||(e=f);t=f.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return t}(e),d=0,o=r.length;d=0},addClass:function(e,t){e.className+=" "+t},removeClass:function(e,t){var i=new RegExp("\\b"+this.escapeRegExp(t)+"\\b");e.className=e.className.replace(i,"")},interpolateString:function(e,t){return e.replace(/{{([a-z][a-z0-9\-_]*)}}/gi,function(e){return t(arguments[1])||""})},getCookie:function(e){var t=("; "+document.cookie).split("; "+e+"=");return t.length<2?void 0:t.pop().split(";").shift()},setCookie:function(e,t,i,n,o,s){var a=new Date;a.setHours(a.getHours()+24*(i||365));var c=[e+"="+t,"expires="+a.toUTCString(),"path="+(o||"/")];n&&c.push("domain="+n),s&&c.push("secure"),document.cookie=c.join(";")},deepExtend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(i in e&&this.isPlainObject(e[i])&&this.isPlainObject(t[i])?this.deepExtend(e[i],t[i]):e[i]=t[i]);return e},throttle:function(e,t){var i=!1;return function(){i||(e.apply(this,arguments),i=!0,setTimeout(function(){i=!1},t))}},hash:function(e){var t,i,n=0;if(0===e.length)return n;for(t=0,i=e.length;t=128?"#000":"#fff"},getLuminance:function(e){var t=parseInt(this.normaliseHex(e),16),i=38+(t>>16),n=38+(t>>8&255),o=38+(255&t);return"#"+(16777216+65536*(i<255?i<1?0:i:255)+256*(n<255?n<1?0:n:255)+(o<255?o<1?0:o:255)).toString(16).slice(1)},isMobile:function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},isPlainObject:function(e){return"object"==typeof e&&null!==e&&e.constructor==Object},traverseDOMPath:function(e,i){return e&&e.parentNode?t.hasClass(e,i)?e:this.traverseDOMPath(e.parentNode,i):null}};e.status={deny:"deny",allow:"allow",dismiss:"dismiss",allowall:"allowall",savesettings:"savesettings",detailed:"detailed"},e.transitionEnd=function(){var e=document.createElement("div"),t={t:"transitionend",OT:"oTransitionEnd",msT:"MSTransitionEnd",MozT:"transitionend",WebkitT:"webkitTransitionEnd"};for(var i in t)if(t.hasOwnProperty(i)&&void 0!==e.style[i+"ransition"])return t[i];return""}(),e.hasTransition=!!e.transitionEnd;var i=Object.keys(e.status).map(t.escapeRegExp);e.customStyles={},e.Popup=function(){var n={enabled:!0,container:null,cookie:{name:"cookieconsent_status",path:"/",domain:"",expiryDays:365,secure:!1},onPopupOpen:function(){},onPopupClose:function(){},onInitialise:function(e){},onStatusChange:function(e,t){},onRevokeChoice:function(){},onNoCookieLaw:function(e,t){},content:{header:"Cookies used on the website!",message:"This website uses cookies to ensure you get the best experience on our website.",dismiss:"Got it!",allow:"Allow cookies",deny:"Decline",savesettings:"Save Settings",link:"Learn more",href:"https://www.cookiesandyou.com",close:"❌",target:"_blank",policy:"Cookie Policy"},elements:{header:' ',message:'{{message}}',messagelink:'{{message}} {{link}}',messageswitchlink:'{{message}} {{link}}{{allswitches}}
',dismiss:'{{dismiss}}',allow:'{{allow}}',deny:'{{deny}}',savesettings:'{{savesettings}}',allowall:'{{allow}}',link:'{{link}}',close:'{{close}}',switch:'{{label}}'},window:'\x3c!--googleoff: all--\x3e{{children}}\x3c!--googleon: all--\x3e
',revokeBtn:'{{policy}}
',blockingScreen:'',blockScreen:!1,makeButtonsEqual:!1,compliance:{info:'{{dismiss}}
',"opt-in":'{{deny}}{{allow}}
',"opt-out":'{{deny}}{{allow}}
',detailed:'{{savesettings}}
',detailedRev:'{{savesettings}}{{allowall}}
'},type:"info",layouts:{basic:"{{messagelink}}{{compliance}}","basic-close":"{{messagelink}}{{compliance}}{{close}}","basic-header":"{{header}}{{message}}{{link}}{{compliance}}",detailed:"{{messageswitchlink}}{{compliance}}"},cookietypes:null,layout:"basic",position:"bottom",theme:"block",static:!1,palette:null,revokable:!0,animateRevokable:!0,showLink:!0,dismissOnScroll:!1,dismissOnTimeout:!1,dismissOnWindowClick:!1,ignoreClicksFrom:["cc-revoke","cc-btn"],autoOpen:!0,autoAttach:!0,whitelistPage:[],blacklistPage:[],overrideHTML:null};function o(){this.initialise.apply(this,arguments)}function s(e){this.openingTimeout=null,t.removeClass(e,"cc-invisible")}function a(t){t.style.display="none",t.removeEventListener(e.transitionEnd,this.afterTransition),this.afterTransition=null}function c(){var e=this.options.position.split("-"),t=[];return e.forEach(function(e){t.push("cc-"+e)}),t}function r(){var e=this.options,i="top"==e.position||"bottom"==e.position?"banner":"floating";return t.isMobile()&&(i="floating"),i}function l(n){var o=this.options,s=document.createElement("div"),a=o.container&&1===o.container.nodeType?o.container:document.body;s.innerHTML=n;var c=s.children[0];return c.style.display="none",t.hasClass(c,"cc-window")&&e.hasTransition&&t.addClass(c,"cc-invisible"),this.onButtonClick=function(n){var o=t.traverseDOMPath(n.target,"cc-btn")||n.target;if(t.hasClass(o,"cc-btn")){var s=o.className.match(new RegExp("\\bcc-("+i.join("|")+")\\b")),a=s&&s[1]||!1;a&&(this.setStatus(a),this.close(!0))}t.hasClass(o,"cc-close")&&(this.setStatus(e.status.dismiss),this.close(!0));t.hasClass(o,"cc-revoke")&&this.revokeChoice()}.bind(this),c.addEventListener("click",this.onButtonClick),o.autoAttach&&(a.firstChild?a.insertBefore(c,a.firstChild):a.appendChild(c)),c}function h(e){return"000000"==(e=t.normaliseHex(e))?"#222":t.getLuminance(e)}function u(e,t){for(var i=0,n=e.length;i=0;o&&t(n);return o}.call(this)&&(this.options.enabled=!1),u(this.options.blacklistPage,location.pathname)&&(this.options.enabled=!1),u(this.options.whitelistPage,location.pathname)&&(this.options.enabled=!0);var o=this.options.window.replace("{{classes}}",function(){var i=this.options;positionStyle=r.call(this);var n=["cc-"+positionStyle,"cc-type-"+i.type,"cc-theme-"+i.theme];i.static&&n.push("cc-static");n.push.apply(n,c.call(this));(function(i){var n=t.hash(JSON.stringify(i)),o="cc-color-override-"+n,s=t.isPlainObject(i);this.customStyleSelector=s?o:null,s&&function(i,n,o){if(e.customStyles[i])return void++e.customStyles[i].references;var s={},a=n.popup,c=n.button,r=n.highlight,l=n.switches;a&&(a.text=a.text?a.text:t.getContrast(a.background),a.link=a.link?a.link:a.text,s[o+".cc-window"]=["color: "+a.text,"background-color: "+a.background],s[o+".cc-revoke"]=["color: "+a.text,"background-color: "+a.background],s[o+" .cc-link,"+o+" .cc-link:active,"+o+" .cc-link:visited"]=["color: "+a.link],c&&(c.text=c.text?c.text:t.getContrast(c.background),c.border=c.border?c.border:"transparent",s[o+" .cc-btn"]=["color: "+c.text,"border-color: "+c.border,"background-color: "+c.background],c.padding&&s[o+" .cc-btn"].push("padding: "+c.padding),"transparent"!=c.background&&(s[o+" .cc-btn:hover, "+o+" .cc-btn:focus"]=["background-color: "+(c.hover||h(c.background))]),r?(r.text=r.text?r.text:t.getContrast(r.background),r.border=r.border?r.border:"transparent",s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+r.text,"border-color: "+r.border,"background-color: "+r.background]):s[o+" .cc-highlight .cc-btn:first-child"]=["color: "+a.text]));l&&(s[".cc-slider"]=["background-color: "+l.background+"!important"],s[".cc-slider:before"]=["background-color: "+l.switch+"!important"],s[".cc-switch-label"]=["color: "+l.text],s["input:checked+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"],s["input:focus+.cc-slider"]=["background-color: "+l.backgroundChecked+"!important"]);var u=document.createElement("style");document.head.appendChild(u),e.customStyles[i]={references:1,element:u.sheet};var d=-1;for(var p in s)s.hasOwnProperty(p)&&u.sheet.insertRule(p+"{"+s[p].join(";")+"}",++d)}(n,i,"."+o);return s}).call(this,this.options.palette);this.customStyleSelector&&n.push(this.customStyleSelector);return n}.call(this).join(" ")).replace("{{children}}",function(){var e={},i=this.options;i.showLink||(i.elements.link="",i.elements.messagelink=i.elements.message);if(i.cookietypes){var n="",o=this.options.cookie;i.cookietypes.forEach(function(e){var s=e.checked,a=t.getCookie(o.name+"_"+e.cookie_suffix);"deny"===a&&(s=""),"allow"===a&&(s="checked"),n+=i.elements.switch.replace(/\{\{cc\-cookietype\-id\}\}/g,e.cookie_suffix).replace(/\{\{label\}\}/g,e.label).replace(/\{\{checked\}\}/g,s).replace(/\{\{disabled\}\}/g,e.disabled).replace(/\{\{theme\}\}/g,i.theme)}),i.elements.messageswitchlink=i.elements.messageswitchlink.replace(/\{\{allswitches\}\}/g,n).replace("{{allswitchesclasses}}",function(){positionStyle=r.call(this);var e=["cc-"+positionStyle];this.customStyleSelector&&e.push(this.customStyleSelector);return e}.call(this).join(" "))}Object.keys(i.elements).forEach(function(n){e[n]=t.interpolateString(i.elements[n],function(e){var t=i.content[e];return e&&"string"==typeof t&&t.length?t:""})});var s=i.compliance[i.type];s||(s=i.compliance.info);e.compliance=t.interpolateString(s,function(t){return e[t]});var a=i.layouts[i.layout];a||(a=i.layouts.basic);return t.interpolateString(a,function(t){return e[t]})}.call(this));this.options.makeButtonsEqual&&(o=o.replace("cc-highlight",""));var s=this.options.overrideHTML;if("string"==typeof s&&s.length&&(o=s),this.options.static){var a=l.call(this,''+o+"
");a.style.display="",this.element=a.firstChild,this.element.style.display="none",t.addClass(this.element,"cc-invisible")}else this.element=l.call(this,o);(function(){var i=this.setStatus.bind(this),n=this.close.bind(this),o=this.options.dismissOnTimeout,s=e.status.dismiss;"detailed"===this.options.type&&(s=e.status.savesettings);"detailedRev"===this.options.type&&(s=e.status.allowall);"opt-in"!==this.options.type&&"opt-out"!==this.options.type||(s=e.status.allow);"number"==typeof o&&o>=0&&this.options.enabled&&(this.dismissTimeout=window.setTimeout(function(){i(s),n(!0)},Math.floor(o)));var a=this.options.dismissOnScroll;if("number"==typeof a&&a>=0){var c=function(e){window.pageYOffset>Math.floor(a)&&(i(s),n(!0),window.removeEventListener("scroll",c,{passive:!0}),this.onWindowScroll=null)};this.options.enabled&&(this.onWindowScroll=c,window.addEventListener("scroll",c,{passive:!0}))}var r=this.options.dismissOnWindowClick,l=this.options.ignoreClicksFrom;if(r){var h=function(e){for(var o=!1,a=e.path.length,c=l.length,r=0;ro&&(i=!0),i?t.hasClass(n,"cc-active")||t.addClass(n,"cc-active"):t.hasClass(n,"cc-active")&&t.removeClass(n,"cc-active")},200);this.onMouseMove=o,window.addEventListener("mousemove",o)}}}.call(this),this.options.autoOpen&&this.autoOpen(),function(){try{link=document.getElementById("nsc_bar_link_show_banner")}catch(e){link=null}this.shortCodeLink=function(){this.revokeChoice()}.bind(this),link&&link.addEventListener("click",this.shortCodeLink)}.call(this)},o.prototype.destroy=function(){this.onButtonClick&&this.element&&(this.element.removeEventListener("click",this.onButtonClick),this.onButtonClick=null),this.dismissTimeout&&(clearTimeout(this.dismissTimeout),this.dismissTimeout=null),this.onWindowScroll&&(window.removeEventListener("scroll",this.onWindowScroll),this.onWindowScroll=null),this.onWindowClick&&(window.removeEventListener("click",this.onWindowClick),this.onWindowClick=null),this.onMouseMove&&(window.removeEventListener("mousemove",this.onMouseMove),this.onMouseMove=null),this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=null,this.revokeBtn&&this.revokeBtn.parentNode&&this.revokeBtn.parentNode.removeChild(this.revokeBtn),this.revokeBtn=null,this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,function(i){if(t.isPlainObject(i)){var n=t.hash(JSON.stringify(i)),o=e.customStyles[n];if(o&&!--o.references){var s=o.element.ownerNode;s&&s.parentNode&&s.parentNode.removeChild(s),e.customStyles[n]=null}}}(this.options.palette),this.options=null},o.prototype.open=function(t){if(this.element)return this.isOpen()||(function(){if(1!=this.options.blockScreen)return!1;var e=this.options.blockingScreen;this.blockingScreen=l.call(this,e),this.blockingScreen.style.display=""}.call(this),e.hasTransition?this.fadeIn():this.element.style.display="",1==this.options.revokable&&this.toggleRevokeButton(),this.options.onPopupOpen.call(this)),this},o.prototype.close=function(t){if(this.element)return this.isOpen()&&(e.hasTransition?this.fadeOut():this.element.style.display="none",this.blockingScreen&&this.blockingScreen.parentNode&&this.blockingScreen.parentNode.removeChild(this.blockingScreen),this.blockingScreen=null,t&&1==this.options.revokable&&this.toggleRevokeButton(!0),this.options.onPopupClose.call(this)),this},o.prototype.fadeIn=function(){var i=this.element;if(e.hasTransition&&i&&(this.afterTransition&&a.call(this,i),t.hasClass(i,"cc-invisible"))){if(i.style.display="",this.options.static){var n=this.element.clientHeight;this.element.parentNode.style.maxHeight=n+"px"}this.openingTimeout=setTimeout(s.bind(this,i),20)}},o.prototype.fadeOut=function(){var i=this.element;e.hasTransition&&i&&(this.openingTimeout&&(clearTimeout(this.openingTimeout),s.bind(this,i)),t.hasClass(i,"cc-invisible")||(this.options.static&&(this.element.parentNode.style.maxHeight=""),this.afterTransition=a.bind(this,i),i.addEventListener(e.transitionEnd,this.afterTransition),t.addClass(i,"cc-invisible")))},o.prototype.isOpen=function(){return this.element&&""==this.element.style.display&&(!e.hasTransition||!t.hasClass(this.element,"cc-invisible"))},o.prototype.toggleRevokeButton=function(e){this.revokeBtn&&(this.revokeBtn.style.display=e?"":"none")},o.prototype.revokeChoice=function(e){this.options.enabled=!0,this.clearStatus(),this.options.onRevokeChoice.call(this),e||this.autoOpen()},o.prototype.hasAnswered=function(t){return Object.keys(e.status).indexOf(this.getStatus())>=0},o.prototype.hasConsented=function(t){var i=this.getStatus();return i==e.status.allow||i==e.status.dismiss||i==e.status.allowall},o.prototype.autoOpen=function(e){!this.hasAnswered()&&this.options.enabled?this.open():this.hasAnswered()&&1==this.options.revokable&&this.toggleRevokeButton(!0)},o.prototype.setStatus=function(i){var n=this.options.cookie,o=t.getCookie(n.name),s=Object.keys(e.status).indexOf(o)>=0;Object.keys(e.status).indexOf(i)>=0?(t.setCookie(n.name,i,n.expiryDays,n.domain,n.path,n.secure),function(e){var i=this.options,n=this.options.cookie;i.cookietypes&&i.cookietypes.forEach(function(i){try{var o;o="allowall"==e?"allow":document.querySelector("input[id="+i.cookie_suffix+"]").checked?"allow":"deny",t.setCookie(n.name+"_"+i.cookie_suffix,o,n.expiryDays,n.domain,n.path,n.secure)}catch(e){}})}.call(this,i),this.options.onStatusChange.call(this,i,s)):this.clearStatus()},o.prototype.getStatus=function(){return t.getCookie(this.options.cookie.name)},o.prototype.clearStatus=function(){var e=this.options.cookie;t.setCookie(e.name,"",-1,e.domain,e.path)},o}(),e.Location=function(){var e={timeout:5e3,services:["ipinfo"],serviceDefinitions:{ipinfo:function(){return{url:"//ipinfo.io",headers:["Accept: application/json"],callback:function(e,t){try{var i=JSON.parse(t);return i.error?s(i):{code:i.country}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},ipinfodb:function(e){return{url:"//api.ipinfodb.com/v3/ip-country/?key={api_key}&format=json&callback={callback}",isScript:!0,callback:function(e,t){try{var i=JSON.parse(t);return"ERROR"==i.statusCode?s({error:i.statusMessage}):{code:i.countryCode}}catch(e){return s({error:"Invalid response ("+e+")"})}}}},maxmind:function(){return{url:"//js.maxmind.com/js/apis/geoip2/v2.1/geoip2.js",isScript:!0,callback:function(e){window.geoip2?geoip2.country(function(t){try{e({code:t.country.iso_code})}catch(t){e(s(t))}},function(t){e(s(t))}):e(new Error("Unexpected response format. The downloaded script should have exported `geoip2` to the global scope"))}}}}};function i(i){t.deepExtend(this.options={},e),t.isPlainObject(i)&&t.deepExtend(this.options,i),this.currentServiceIndex=-1}function n(e,t,i){var n,o=document.createElement("script");o.type="text/"+(e.type||"javascript"),o.src=e.src||e,o.async=!1,o.onreadystatechange=o.onload=function(){var e=o.readyState;clearTimeout(n),t.done||e&&!/loaded|complete/.test(e)||(t.done=!0,t(),o.onreadystatechange=o.onload=null)},document.body.appendChild(o),n=setTimeout(function(){t.done=!0,t(),o.onreadystatechange=o.onload=null},i)}function o(e,t,i,n,o){var s=new(window.XMLHttpRequest||window.ActiveXObject)("MSXML2.XMLHTTP.3.0");if(s.open(n?"POST":"GET",e,1),s.setRequestHeader("Content-type","application/x-www-form-urlencoded"),Array.isArray(o))for(var a=0,c=o.length;a3&&t(s)}),s.send(n)}function s(e){return new Error("Error ["+(e.code||"UNKNOWN")+"]: "+e.error)}return i.prototype.getNextService=function(){var e;do{e=this.getServiceByIdx(++this.currentServiceIndex)}while(this.currentServiceIndex=0,revokable:t.revokable.indexOf(e)>=0,explicitAction:t.explicitAction.indexOf(e)>=0}},i.prototype.applyLaw=function(e,t){var i=this.get(t);return i.hasLaw||(e.enabled=!1,"function"==typeof e.onNoCookieLaw&&e.onNoCookieLaw(t,i)),this.options.regionalLaw&&(i.revokable&&(e.revokable=!0),i.explicitAction&&(e.dismissOnScroll=!1,e.dismissOnTimeout=!1)),e},i}(),e.initialise=function(i,n,o){var s=new e.Law(i.law);"detailed"!=i.type&&"detailedRev"!=i.type||(i.layout="detailed"),n||(n=function(){}),o||(o=function(){});var a=Object.keys(e.status),c=t.getCookie("cookieconsent_status");a.indexOf(c)>=0?n(new e.Popup(i)):e.getCountryCode(i,function(t){delete i.law,delete i.location,t.code&&(i=s.applyLaw(i,t.code)),n(new e.Popup(i))},function(t){delete i.law,delete i.location,o(t,new e.Popup(i))})},e.getCountryCode=function(t,i,n){t.law&&t.law.countryCode?i({code:t.law.countryCode}):t.location?new e.Location(t.location).locate(function(e){i(e||{})},n):i({})},e.utils=t,e.hasInitialised=!0,window.cookieconsent=e}}(window.cookieconsent||{});